#include <iostream>
#include <cmath>

#define MOD 1000000007 //1e9+7
using namespace std;
//n<4, x = x^(n-1) +1
//n>=4, x = 2^(n-1)-n+4
int main()
{
    long long n;
    cin >> n;
    if(n<4) cout << (int)(pow(2, n-1)+1);
    else
    {

    }
    return 0;
}

long long PowMod(long long n)
{


}
